package cn.funnyxb.powerremember.pullMsg.beans;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import cn.funnyxb.tools.appFrame.debugTool.Debuger;
import java.util.HashMap;

public class AppConfig
{
  private static final String KEY_adFunction_closeAdOnLdpi = "adfunc_closeAdOnLdpi";
  private static final String KEY_adQuantityFunction = "adQuantityFunction";
  private static final String KEY_adQuantity_asShowTimes_forAClick = "adQuantity_asShowTimes_forAClick";
  private static final String KEY_adQuantity_showTimes_aStart_most = "adQuantity_showTimes_aStart_most";
  private static final String KEY_adQuantity_showTimes_today_least = "adQuantity_showTimes_today_least";
  private static final String KEY_adQuantity_showTimes_today_most = "adQuantity_showTimes_today_most";
  private static final String KEY_adfunction = "adfunc";
  private static final String KEY_adfunction_autobrow_adview = "ad_autobrow_adview";
  private static final String KEY_adfunction_autobrow_airad = "ad_autobrow_airad";
  private static final String KEY_adfunction_autobrow_weiqian = "ad_autobrow_weiqian";
  private static final String KEY_adfunction_study_adview = "ad_study_adview";
  private static final String KEY_adfunction_study_airad = "ad_study_airad";
  private static final String KEY_adfunction_study_weiqian = "ad_study_weiqian";
  private static final String KEY_downed = "downed";
  private static final String KEY_mustUpdate = "mustupdate";
  private static final String KEY_valid = "valid";
  public static final String METANAME_SUBVERSION = "SubVersionName";
  private static final String SPNAME = "SharedPreferences_Config";
  private static final boolean adFunction_autobrow_adview_def = 1;
  private static final boolean adFunction_autobrow_airad_def = 0;
  private static final boolean adFunction_autobrow_weiqian_def = 0;
  private static final boolean adFunction_closeAdOnLdpi_def = 1;
  private static final boolean adFunction_def = 1;
  private static final boolean adFunction_study_adview_def = 1;
  private static final boolean adFunction_study_airad_def = 0;
  private static final boolean adFunction_study_weiqian_def = 0;
  private static final boolean adQuantityFunction_def = 0;
  private static final int adQuantity_asShowTimes_forAClick_def = 30;
  private static final int adQuantity_showTimes_aStart_most_def = 40;
  private static final int adQuantity_showTimes_today_least_def = 10;
  private static final int adQuantity_showTimes_today_most_def = 70;
  private static final boolean mustUpdate_def = 0;
  private static final boolean valid_def = 1;
  private static Watcher watcher;
  private boolean adFunction;
  private boolean adFunction_autobrow_adview;
  private boolean adFunction_autobrow_airad;
  private boolean adFunction_autobrow_weiqian;
  private boolean adFunction_closeAdOnLdpi;
  private boolean adFunction_study_adview;
  private boolean adFunction_study_airad;
  private boolean adFunction_study_weiqian;
  private boolean adQuantityFunction;
  private int adQuantity_asShowTimes_forAClick;
  private int adQuantity_showTimes_aStart_most;
  private int adQuantity_showTimes_today_least;
  private int adQuantity_showTimes_today_most;
  private boolean mustUpdate;
  private String subVersionName = "";
  private boolean valid;
  private int versionCode = -1;

  public static AppConfig getAppConfigFromCache(Context paramContext)
  {
    SharedPreferences localSharedPreferences = paramContext.getSharedPreferences("SharedPreferences_Config", 0);
    if (!(localSharedPreferences.getBoolean("downed", false)));
    AppConfig localAppConfig;
    for (Object localObject = getDefault(); ; localObject = localAppConfig)
    {
      return localObject;
      localAppConfig = new AppConfig();
      localAppConfig.valid = localSharedPreferences.getBoolean("valid", true);
      localAppConfig.mustUpdate = localSharedPreferences.getBoolean("mustupdate", false);
      localAppConfig.adFunction = localSharedPreferences.getBoolean("adfunc", true);
      localAppConfig.adFunction_closeAdOnLdpi = localSharedPreferences.getBoolean("adfunc_closeAdOnLdpi", true);
      localAppConfig.adFunction_study_adview = localSharedPreferences.getBoolean("ad_study_adview", true);
      localAppConfig.adFunction_study_airad = localSharedPreferences.getBoolean("ad_study_airad", false);
      localAppConfig.adFunction_study_weiqian = localSharedPreferences.getBoolean("ad_study_weiqian", false);
      localAppConfig.adFunction_autobrow_adview = localSharedPreferences.getBoolean("ad_autobrow_adview", true);
      localAppConfig.adFunction_autobrow_airad = localSharedPreferences.getBoolean("ad_autobrow_airad", false);
      localAppConfig.adFunction_autobrow_weiqian = localSharedPreferences.getBoolean("ad_autobrow_weiqian", false);
      localAppConfig.adQuantityFunction = localSharedPreferences.getBoolean("adQuantityFunction", false);
      localAppConfig.adQuantity_showTimes_today_least = localSharedPreferences.getInt("adQuantity_showTimes_today_least", 10);
      localAppConfig.adQuantity_showTimes_today_most = localSharedPreferences.getInt("adQuantity_showTimes_today_most", 70);
      localAppConfig.adQuantity_showTimes_aStart_most = localSharedPreferences.getInt("adQuantity_showTimes_aStart_most", 40);
      localAppConfig.adQuantity_asShowTimes_forAClick = localSharedPreferences.getInt("adQuantity_asShowTimes_forAClick", 30);
      log("load config from cache=" + localAppConfig);
    }
  }

  private static AppConfig getDefault()
  {
    AppConfig localAppConfig = new AppConfig();
    localAppConfig.valid = true;
    localAppConfig.mustUpdate = false;
    localAppConfig.adFunction = true;
    localAppConfig.adFunction_closeAdOnLdpi = true;
    localAppConfig.adFunction_study_adview = true;
    localAppConfig.adFunction_study_airad = false;
    localAppConfig.adFunction_study_weiqian = false;
    localAppConfig.adFunction_autobrow_adview = true;
    localAppConfig.adFunction_autobrow_airad = false;
    localAppConfig.adFunction_autobrow_weiqian = false;
    localAppConfig.adQuantityFunction = false;
    localAppConfig.adQuantity_showTimes_today_least = 10;
    localAppConfig.adQuantity_showTimes_today_most = 70;
    localAppConfig.adQuantity_showTimes_aStart_most = 40;
    localAppConfig.adQuantity_asShowTimes_forAClick = 30;
    return localAppConfig;
  }

  public static Watcher getWatcher()
  {
    return watcher;
  }

  private static void log(String paramString)
  {
    Debuger.log("appconfig", paramString);
  }

  public static AppConfig parseFromHashMap(HashMap<String, String> paramHashMap)
  {
    if (paramHashMap == null);
    AppConfig localAppConfig;
    for (Object localObject = null; ; localObject = localAppConfig)
    {
      return localObject;
      localAppConfig = new AppConfig();
      localAppConfig.versionCode = Integer.parseInt((String)paramHashMap.get("versioncode"));
      localAppConfig.subVersionName = ((String)paramHashMap.get("subversionname"));
      localAppConfig.valid = Boolean.parseBoolean((String)paramHashMap.get("valid"));
      localAppConfig.mustUpdate = Boolean.parseBoolean((String)paramHashMap.get("mustupdate"));
      localAppConfig.adFunction = Boolean.parseBoolean((String)paramHashMap.get("adfunc"));
      localAppConfig.adFunction_closeAdOnLdpi = Boolean.parseBoolean((String)paramHashMap.get("adfunc_closead_onldpi"));
      localAppConfig.adFunction_study_airad = Boolean.parseBoolean((String)paramHashMap.get("adfunc_study_airad"));
      localAppConfig.adFunction_study_adview = Boolean.parseBoolean((String)paramHashMap.get("adfunc_study_adview"));
      localAppConfig.adFunction_study_weiqian = Boolean.parseBoolean((String)paramHashMap.get("adfunc_study_weiqian"));
      localAppConfig.adFunction_autobrow_airad = Boolean.parseBoolean((String)paramHashMap.get("adfunc_autobrow_airad"));
      localAppConfig.adFunction_autobrow_adview = Boolean.parseBoolean((String)paramHashMap.get("adfunc_autobrow_adview"));
      localAppConfig.adFunction_autobrow_weiqian = Boolean.parseBoolean((String)paramHashMap.get("adfunc_autobrow_weiqian"));
      localAppConfig.adQuantityFunction = Boolean.parseBoolean((String)paramHashMap.get("adquantityfunc"));
      localAppConfig.adQuantity_showTimes_today_least = Integer.parseInt((String)paramHashMap.get("adquantity_todayleat"));
      localAppConfig.adQuantity_showTimes_today_most = Integer.parseInt((String)paramHashMap.get("adquantity_todaymost"));
      localAppConfig.adQuantity_showTimes_aStart_most = Integer.parseInt((String)paramHashMap.get("adquantity_astartmost"));
      localAppConfig.adQuantity_asShowTimes_forAClick = Integer.parseInt((String)paramHashMap.get("adquantity_asshow_aclick"));
    }
  }

  public int getAdQuantity_asShowTimes_forAClick()
  {
    return this.adQuantity_asShowTimes_forAClick;
  }

  public int getAdQuantity_showTimes_aStart_most()
  {
    return this.adQuantity_showTimes_aStart_most;
  }

  public int getAdQuantity_showTimes_today_least()
  {
    return this.adQuantity_showTimes_today_least;
  }

  public int getAdQuantity_showTimes_today_most()
  {
    return this.adQuantity_showTimes_today_most;
  }

  public String getSubVersionName()
  {
    return this.subVersionName;
  }

  public int getVersionCode()
  {
    return this.versionCode;
  }

  public boolean isAdFunction()
  {
    return this.adFunction;
  }

  public boolean isAdFunction_autobrow_adview()
  {
    return this.adFunction_autobrow_adview;
  }

  public boolean isAdFunction_autobrow_airad()
  {
    return this.adFunction_autobrow_airad;
  }

  public boolean isAdFunction_autobrow_weiqian()
  {
    return this.adFunction_autobrow_weiqian;
  }

  public boolean isAdFunction_closeAdOnLdpi()
  {
    return this.adFunction_closeAdOnLdpi;
  }

  public boolean isAdFunction_study_adview()
  {
    return this.adFunction_study_adview;
  }

  public boolean isAdFunction_study_airad()
  {
    return this.adFunction_study_airad;
  }

  public boolean isAdFunction_study_weiqian()
  {
    return this.adFunction_study_weiqian;
  }

  public boolean isAdQuantityFunction()
  {
    return this.adQuantityFunction;
  }

  public boolean isMustUpdate()
  {
    return this.mustUpdate;
  }

  public boolean isValid()
  {
    return this.valid;
  }

  public void regWatcher(Watcher paramWatcher)
  {
    watcher = paramWatcher;
  }

  public void saveAsCache(Context paramContext)
  {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("SharedPreferences_Config", 0).edit();
    localEditor.putBoolean("downed", true);
    localEditor.putBoolean("valid", this.valid);
    localEditor.putBoolean("mustupdate", this.mustUpdate);
    localEditor.putBoolean("adfunc", this.adFunction);
    localEditor.putBoolean("adfunc_closeAdOnLdpi", this.adFunction_closeAdOnLdpi);
    localEditor.putBoolean("ad_study_adview", this.adFunction_study_adview);
    localEditor.putBoolean("ad_study_airad", this.adFunction_study_airad);
    localEditor.putBoolean("ad_study_weiqian", this.adFunction_study_weiqian);
    localEditor.putBoolean("ad_autobrow_adview", this.adFunction_autobrow_adview);
    localEditor.putBoolean("ad_autobrow_airad", this.adFunction_autobrow_airad);
    localEditor.putBoolean("ad_autobrow_weiqian", this.adFunction_autobrow_weiqian);
    localEditor.putBoolean("adQuantityFunction", this.adQuantityFunction);
    localEditor.putInt("adQuantity_showTimes_today_least", this.adQuantity_showTimes_today_least);
    localEditor.putInt("adQuantity_showTimes_today_most", this.adQuantity_showTimes_today_most);
    localEditor.putInt("adQuantity_showTimes_aStart_most", this.adQuantity_showTimes_aStart_most);
    localEditor.putInt("adQuantity_asShowTimes_forAClick", this.adQuantity_asShowTimes_forAClick);
    localEditor.commit();
  }

  public void setAdFunction(boolean paramBoolean)
  {
    this.adFunction = paramBoolean;
  }

  public void setAdFunction_autobrow_adview(boolean paramBoolean)
  {
    this.adFunction_autobrow_adview = paramBoolean;
  }

  public void setAdFunction_autobrow_airad(boolean paramBoolean)
  {
    this.adFunction_autobrow_airad = paramBoolean;
  }

  public void setAdFunction_autobrow_weiqian(boolean paramBoolean)
  {
    this.adFunction_autobrow_weiqian = paramBoolean;
  }

  public void setAdFunction_study_adview(boolean paramBoolean)
  {
    this.adFunction_study_adview = paramBoolean;
  }

  public void setAdFunction_study_airad(boolean paramBoolean)
  {
    this.adFunction_study_airad = paramBoolean;
  }

  public void setAdFunction_study_weiqian(boolean paramBoolean)
  {
    this.adFunction_study_weiqian = paramBoolean;
  }

  public void setAdQuantityFunction(boolean paramBoolean)
  {
    this.adQuantityFunction = paramBoolean;
  }

  public void setAdQuantity_asShowTimes_forAClick(int paramInt)
  {
    this.adQuantity_asShowTimes_forAClick = paramInt;
  }

  public void setAdQuantity_showTimes_aStart_most(int paramInt)
  {
    this.adQuantity_showTimes_aStart_most = paramInt;
  }

  public void setAdQuantity_showTimes_today_least(int paramInt)
  {
    this.adQuantity_showTimes_today_least = paramInt;
  }

  public void setAdQuantity_showTimes_today_most(int paramInt)
  {
    this.adQuantity_showTimes_today_most = paramInt;
  }

  public void setMetaName(String paramString)
  {
    this.subVersionName = paramString;
  }

  public void setMustUpdate(boolean paramBoolean)
  {
    this.mustUpdate = paramBoolean;
  }

  public void setValid(boolean paramBoolean)
  {
    this.valid = paramBoolean;
  }

  public void setVersionCode(int paramInt)
  {
    this.versionCode = paramInt;
  }

  public String toString()
  {
    return "AppConfig [versionCode=" + this.versionCode + ", subVersionName=" + this.subVersionName + ", valid=" + this.valid + ", mustUpdate=" + this.mustUpdate + ", adFunction=" + this.adFunction + ", adFunction_study_airad=" + this.adFunction_study_airad + ", adFunction_study_adview=" + this.adFunction_study_adview + ", adFunction_study_weiqian=" + this.adFunction_study_weiqian + ", adFunction_autobrow_airad=" + this.adFunction_autobrow_airad + ", adFunction_autobrow_adview=" + this.adFunction_autobrow_adview + ", adFunction_autobrow_weiqian=" + this.adFunction_autobrow_weiqian + ", adQuantityFunction=" + this.adQuantityFunction + ", adQuantity_showTimes_today_least=" + this.adQuantity_showTimes_today_least + ", adQuantity_showTimes_today_most=" + this.adQuantity_showTimes_today_most + ", adQuantity_showTimes_aStart_most=" + this.adQuantity_showTimes_aStart_most + ", adQuantity_asShowTimes_forAClick=" + this.adQuantity_asShowTimes_forAClick + "]";
  }

  public static abstract interface Watcher
  {
    public abstract void onConfigChanger(AppConfig paramAppConfig);
  }
}

/* Location:           E:\Desktop\复件 classes_dex2jar.jar
 * Qualified Name:     cn.funnyxb.powerremember.pullMsg.beans.AppConfig
 * JD-Core Version:    0.5.3
 */